<?php
/**
 * Created by PhpStorm OF yuyi.
 * User: YUYI
 * Date: 2018/5/17 0017
 * Time: 上午 9:59
 * Administrator
 */

namespace app\index\controller;


use app\common\controller\Base;
use app\common\model\AccountBook;
use app\common\model\Articles;
use app\common\model\Menus;
use app\common\service\UserService;
use think\Request;

class Admin extends Base
{

    public function index()
    {
        return $this->fetch();
    }

    public function articleList()
    {
        $user = UserService::getCurrentUserInfo();
        $arts = Articles::all(['userId'=>$user['userId']]);
        $this->assign('articles',$arts);
        return $this->fetch();
    }

    public function accbook()
    {
        $user = UserService::getCurrentUserInfo();
        $accBook = AccountBook::all(['account_book.userid'=>$user['userId']],'getBankList');
        $this->assign('accbook',$accBook);
        return $this->fetch();
    }

    public function accbookDel($id)
    {

    }
}